<template>
  <div class="bgFlex">
    <div class="backbtn" :style="'background-color:'+color" @click="toback">返回列表</div>
  </div>
</template>

<script>
export default {
  data(){
    return{}
  },
  methods:{
    toback(){
      if(this.isSave){
        this.$emit('clickSave')
      }else{
        this.$router.back()
      }
    }
  },
  props:{
    color:{},
    isSave:false,
  },
  created() {
  }
}
</script>

<style scoped lang="less">
.bgFlex{
  background-color: #fff;
  width: 100%;
  padding: 0.5rem 4%;
  box-sizing: border-box;
  position: fixed;
  bottom: 0rem;
  left: 0%;
  .backbtn{
    width: 100%;
    color: white;
    text-align: center;
    line-height: 2.2rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    letter-spacing: 0.1rem;
  }
}
</style>
